home *** CD-ROM | disk | FTP | other *** search
- Path: got.mindspring.com!user
- From: got@mindspring.com (Gordon Tillman)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: [Q] Comments on "Algorithm in C" or "Algorithm in C++"
- Date: Fri, 19 Apr 1996 07:50:05 -0400
- Organization: MindSpring Enterprises
- Message-ID: <got-1904960750050001@got.mindspring.com>
- References: <4kgj3f$nug@sun.rhbnc.ac.uk> <31767bff.68611528@nntp.ix.netcom.com>
- NNTP-Posting-Host: got.mindspring.com
-
- Hi Jim,
-
- You were asking about these:
-
- > Yesterday I went to a bookshop and saw two books written
- > by Robert Sedgewick. One is
- >
- > Algorithms in C
- >
- > and aother
- >
- > Algorithms in C++
- >
- > I briefly compared the two books and found they are identical. Only
- > differences are the covers and several words in the first chapter.
- > The same contents for the two books made me wonder if they are really
- > worth to buy. Surely "Algorithms in C++" can not be called "SOMETHING in C++"
- > if it does not uses the C++ feature. Before I spend money on it,
- > I really want to hear any comments on the books from you. Or could
- > you recommendate me another algorithm books on C/C++.
-
- I have and use the _Algorithms_in_C++_ book. I find the descriptions and
- examples informative. However, I do not think the code examples are very
- well written. In every case where I have used the information in the
- book, I have done the following:
-
- 1. Read through the section I am interested in.
- 2. Work through the examples on paper very carefully, to make sure
- I understand what Sedgewick is talking about.
- 3. Write MY OWN code to implement the algorithm.
-
- The most recent stuff that I used from that book was the section on
- red-black trees. I had two goals with that information:
-
- 1. I wanted to implement the code as a C++ template.
- 2. I thought the way the author implemented the algorithm he used
- too many comparisons. For some objects these compares could
- be quite expensive. The author hinted that the algorithm could
- be implemented using fewer comparisons. Sure enough!
-
- Anyway, I was able to accomplish both goals, but it took about a day and a half.
-
- I am going to take a look at the book that Michael Rubenstein recommended.
-
- --gordon
-